<%@ include file="/common/taglibs.jsp" %>

<head>
    <title><fmt:message key="userList.title"/></title>
    <meta name="heading" content="<fmt:message key='userList.heading'/>"/>
    <meta name="menu" content="AdminMenu"/>
</head>
<style type="text/css">
	.table tr.odd {
	    background: #eee;
	    border-top: 1px solid #c0c0c0;
	    color: #000000;
	}

.table tr.even {
    background: #fff;
    border-top: 1px solid #c0c0c0;
    color: #000000;
	}
	
	div.search_results{
				float: left;
				padding-left: 2px;
				width: 905px;
				border: 0px solid gray;
			}

		div.left_div{
				float: left;
				padding-left: 2px;
				width: 370px;
				margin-bottom: 15px;
				height: 250px;
				border: 0px solid gray;
			}
			div.right_div{
				float: left;
				padding-left: 2px;
				
				width: 515px;
				margin-left: 15px;
				margin-bottom: 15px;
				height: 250px;
				border: 1px solid gray;
			}
</style>

<div class="span11">
    <h2><fmt:message key="userList.heading"/></h2>
    <div id="search">
        <form method="get" action="${ctx}/admin/users.action" id="searchForm" class="form-search">
            <input type="text" size="20" name="q" id="query" value="${param.q}"
                   placeholder="Enter search terms..." class="input-medium search-query"/>
            <input type="submit" value="<fmt:message key="button.search"/>" class="btn"/>
        </form>
    </div>

    <input type="button" style="margin-right: 5px" class="btn"
           onclick="location.href='<c:url value="/editUser.action?method=Add&from=list"/>'"
           value="<fmt:message key="button.add"/>"/>

    <input type="button" onclick="location.href='<c:url value="/mainMenu.action"/>'" class="btn"
           value="<fmt:message key="button.done"/>"/>

    <display:table name="users" cellspacing="0" cellpadding="0" requestURI=""
                   defaultsort="1" id="users" pagesize="25" class="table table-condensed" export="false">
        <display:column property="username" escapeXml="true" sortable="false" titleKey="user.username" style="width: 25%"
                        url="/editUser.action?from=list" paramId="id" paramProperty="id"/>
        <display:column property="fullName" escapeXml="true" sortable="false" titleKey="activeUsers.fullName"
                        style="width: 26%"/>
		<display:column property="userType" escapeXml="true" sortable="false" title="UserType"
                        style="width: 10%"/>                        
        <display:column property="email" sortable="false" titleKey="user.email" style="width: 25%" autolink="true"
                        media="html"/>
        <display:column property="email" titleKey="user.email" media="csv xml excel pdf"/>
        <display:column sortProperty="enabled" sortable="false" titleKey="user.enabled"
                        style="width: 14%; padding-left: 15px" media="html">
            <input type="checkbox" disabled="disabled" <c:if test="${users.enabled}">checked="checked"</c:if>/>
        </display:column>
        <display:column property="enabled" titleKey="user.enabled" media="csv xml excel pdf"/>

        <display:setProperty name="paging.banner.item_name" value="user"/>
        <display:setProperty name="paging.banner.items_name" value="users"/>

        <display:setProperty name="export.excel.filename" value="User List.xls"/>
        <display:setProperty name="export.csv.filename" value="User List.csv"/>
        <display:setProperty name="export.pdf.filename" value="User List.pdf"/>
    </display:table>
</div>
